package com.googlecode.alfrescocachingserver.model;

import java.io.IOException;
import java.util.ResourceBundle;

import org.springframework.extensions.webscripts.Container;
import org.springframework.extensions.webscripts.Description;
import org.springframework.extensions.webscripts.URLModelFactory;
import org.springframework.extensions.webscripts.WebScript;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;

import com.googlecode.alfrescocachingserver.extractor.CacheIdExtractor;

public class CacheWebScript implements WebScript
{
    protected Description description;
    protected String cacheName;
    protected CacheIdExtractor cacheIdExtractor;
    
    public CacheWebScript(Description description, String cacheName, CacheIdExtractor cacheIdExtractor)
    {
        this.description = description;
        this.cacheName = cacheName;
        this.cacheIdExtractor = cacheIdExtractor;
    }

    @Override
    public void execute(WebScriptRequest arg0, WebScriptResponse arg1) throws IOException
    {
        throw new UnsupportedOperationException("NOT IMPLEMENTED");
    }

    public String getCacheName()
    {
        return cacheName;
    }

    public CacheIdExtractor getCacheIdExtractor()
    {
        return cacheIdExtractor;
    }

    @Override
    public Description getDescription()
    {
        return description;
    }

    @Override
    public ResourceBundle getResources()
    {
        throw new UnsupportedOperationException("NOT IMPLEMENTED");
    }

    @Override
    public void init(Container container, Description description)
    {
        throw new UnsupportedOperationException("NOT IMPLEMENTED");
    }

    @Override
    public void setURLModelFactory(URLModelFactory urlModelFactory)
    {
        throw new UnsupportedOperationException("NOT IMPLEMENTED");
    }
}
